package com.happy.cat.project.system.service;

import com.happy.cat.project.system.domain.CatResource;
import com.happy.cat.project.system.domain.OssPolicyResultVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * @Author: verne
 * @Data: 2020/7/27 15:39
 */
public interface ICatAliOssService {

    /**
     * 上传文件
     * @param multpartFile
     * @param resType
     * @param subFix
     * @return
     */
    CatResource storeFile(MultipartFile multpartFile, String resType, String subFix) throws IOException ;

    /**
     * 获取OSS签名,用于页面直传方式
     * @param resType
     * @return
     */
    OssPolicyResultVo policy(String resType, String subFix);

    /**
     * 签名直传成功回调
     * @param request
     * @return
     */
    CatResource callback(HttpServletRequest request);
}
